home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
prtfrm51.zip
/
FRMSRC.ZIP
/
FDEMO07.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-06-20
|
3KB
|
117 lines
unit Fdemo07;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
StdCtrls, Forms, DBCtrls, DB, DBGrids, Mask, DBTables, Grids, ExtCtrls,
PrnWin, Buttons, Printers, CB_Types;
type
TForm07 = class(TForm)
DBGrid1: TDBGrid;
DBNavigator: TDBNavigator;
Panel1: TPanel;
DataSource1: TDataSource;
Panel2: TPanel;
Panel3: TPanel;
Table1: TTable;
Table2: TTable;
DataSource2: TDataSource;
ScrollBox: TScrollBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
EditCustNo: TDBEdit;
EditCompany: TDBEdit;
EditAddr: TDBEdit;
EditAddr2: TDBEdit;
EditCity: TDBEdit;
EditState: TDBEdit;
EditZip: TDBEdit;
Preview: TBitBtn;
Label9: TLabel;
Table2OrderNo: TFloatField;
Table2CustNo: TFloatField;
Table2SaleDate: TDateTimeField;
Table2ShipDate: TDateTimeField;
Table2ShipVIA: TStringField;
Table2Terms: TStringField;
Table2PaymentMethod: TStringField;
Table2ItemsTotal: TCurrencyField;
Table2AmountPaid: TCurrencyField;
Exit: TBitBtn;
PrintWin1: TPrintWin;
DBNavigator1: TDBNavigator;
GroupBox1: TGroupBox;
Label8: TLabel;
CheckBox1: TCheckBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioGroup1: TRadioGroup;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
procedure FormCreate(Sender: TObject);
procedure PreviewClick(Sender: TObject);
procedure ExitClick(Sender: TObject);
private
{ private declarations }
public
end;
var
Form07: TForm07;
implementation
{$R *.DFM}
procedure TForm07.FormCreate(Sender: TObject);
begin
Table1.Open;
Table2.Open;
end;
procedure TForm07.PreviewClick(Sender: TObject);
var
y: Real;
begin
PrintWin1.BeginPrint;
PrintWin1.NewFont ('Arial',20,True,True,True);
PrintWin1.SetTheTextColor (RGB(255,0,0));
PrintWin1.DrawText( 1.2,poCenter,'The Customer');
PrintWin1.NewFont ('Arial',18,False,False,False);
PrintWin1.SetTheTextColor (RGB(0,0,0));
PrintWin1.DrawWindow( 2.1,poCenter,ScrollBox);
y := 5.0;
PrintWin1.SelectPen (2, RGB(255,0,0));
PrintWin1.NewFont ('Arial',20,True,True,True);
PrintWin1.SetTheTextColor (RGB(255,0,0));
PrintWin1.DrawText( y,poCenter,'The Orders');
PrintWin1.SetFrameStyle(frThinThick);
PrintWin1.NewFont ('Arial',14,False,True,False);
PrintWin1.SetTheTextColor (RGB(0,0,0));
PrintWin1.DrawTable( 6.0,poCenter, Table2, True, False);
PrintWin1.EndPrint;
end;
procedure TForm07.ExitClick(Sender: TObject);
begin
Close;
end;
end.